<style>
    .table th{
        text-align: center;
        vertical-align:middle;
    }
    .table td{
        text-align: center;
        vertical-align:middle;
    }
</style>
<div class="row-fluid listcontent">
    <div class="span12">
        <div class="portlet box grey">
            <div class="portlet-title">
                <div class="caption"><i class="icon-cogs"></i>财务列表</div>
            </div>
            <div class="portlet-body">
                <div class="dataTables_wrapper form-inline">
                    <div class="row-fluid">
                        <div class="span12">
                            <form id="searchform" action="{$action}" method="post">
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="支付方式:  "/>
                                        <select name='pay' style="width: 80px;margin-right: 10px" value="">
                                            <option value="">全部</option>
                                            <option value="1" <?php if (isset($pay) && ($pay == 1)) { ?>selected="selected"<?php } ?>>微信</option>
                                            <option value="2" <?php if (isset($pay) && ($pay == 2)) { ?>selected="selected"<?php } ?>>支付宝</option>
                                        </select>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="召集令:  "/>
                                        <select name='type' style="width: 80px;margin-right: 10px" value="">
                                            <option value="">全部</option>
                                            <option value="2" <?php if (isset($type) && ($type == 2)) { ?>selected="selected"<?php } ?>>铜牌</option>
                                            <option value="3" <?php if (isset($type) && ($type == 3)) { ?>selected="selected"<?php } ?>>银牌</option>
                                            <option value="4" <?php if (isset($type) && ($type == 4)) { ?>selected="selected"<?php } ?>>金牌</option>
                                        </select>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="交易状态:  "/>
                                        <select name='state' style="width: 80px;margin-right: 10px" value="">
                                            <option value="">全部</option>
                                            <option value="1" <?php if (isset($state) && ($state == 1)) { ?>selected="selected"<?php } ?>>已完成</option>
                                            <option value="2" <?php if (isset($state) && ($state == 2)) { ?>selected="selected"<?php } ?>>已关闭</option>
                                        </select>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left;">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="搜索:  "/>
                                        <input type="text" name="keywords" placeholder="ID/昵称"
                                               aria-controls="sample_2" class="m-wrap"
                                               value="{$keywords?$keywords:''}" style="height:20px"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="注册"/>
                                        <input type="text" name="pay_start"
                                               aria-controls="sample_2" class="m-wrap" value="{$pay_start?$pay_start:''}" style="height:20px"  onclick="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss'})" placeholder="支付开始时间"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="text" name="pay_end" placeholder="支付结束时间"
                                               aria-controls="sample_2" class="m-wrap" value="{$pay_end?$pay_end:''}" style="height:20px"   onclick="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss'})"  />
                                    </label>
                                </div>

                                <div class="dataTables_filter" id="sample_2_filter" style="float: left;margin-left:10px">
                                    <label>
                                        <input type="button" class="btn blue search" value="提交"/>
                                    </label>
                                </div>
                            </form>
                        </div>
                    </div>
                    <input type="hidden" name="page" value="{$page?$page:''}">
                    <table id="basicinfo" class="table table-hover table-bordered">
                        <thead>
                        <th style="width:8px;"><input type="checkbox"/></th>
                        <th>序号</th>
                        <th>ID</th>
                        <th>召集令类型</th>
                        <th>购买时长</th>
                        <th>实付款(¥)</th>
                        <th>支付方式</th>
                        <th>支付时间</th>
                        <th>用户名</th>
                        <th>交易状态</th>
                        </thead>
                        <tbody>
                        {if(count($list)>0)}
                        {volist name='list' id='val' k='key'}
                        <tr class="odd gradeX ">
                            <td><input type="checkbox" class="checkboxes" name="id" value="{$val.order_id}"/></td>
                            <td>{:xuHao($key,$pages)}</td>
                            <td>{$val.order_id}</td>
                            <td>
                                <?php if($val['order_long_type'] == 2){?>
                                    <span class="label label-info" style="background:#A87E5E;">铜牌</span>
                                <?php }elseif($val['order_long_type'] == 3){ ?>
                                    <span class="label label-danger" style="background:#D8D8D8;">银牌</span>
                                <?php }else{ ?>
                                    <span class="label label-danger" style="background:#F1CA13;">金牌</span>
                                <?php } ?>
                            </td>
                            <td>{$val.long_how}</td>
                            <td>{$val.order_user_pay}</td>
                            <td>
                                <?php if($val['order_type'] == 1){?>
                                    微信
                                <?php }else if($val['order_type'] == 2){ ?>
                                    支付宝
                                <?php }else if($val['order_type'] == 3){ ?>
                                    苹果内购
                                <?php } ?>
                            </td>
                            <td>{$val.order_ali_paytime}</td>
                            <td>{$val.user_username}</td>
                            <td>
                                <?php if($val['order_status'] == 1){?>
                                    <span class="label label-info">已完成</span>
                                <?php }else{ ?>
                                    <span class="label label-danger" style="background:red;">已关闭</span>
                                <?php } ?>
                            </td>
                        </tr>
                        {/volist}
                        {else/}
                        <tr>
                            <td colspan="16"><span style="margin-left: 50px">暂无数据</span></td>
                        </tr>
                        {/if}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        {if(!empty($list))}
        {$list->render()}
        {/if}
    </div>
</div>
